package exception;

import java.awt.*;
import java.io.FileNotFoundException;
import java.io.IOException;

public class ThrowsDemo2 {
    public void dosome()throws IOException, AWTException{

    }
}
class SubClass extends ThrowsDemo2{
    //public void dosome() throws IOException{}//完全相同一定可以
    //public void dosome(){}//不抛出也可以
    //public void dosome()throws IOException{}//仅抛出部分异常
    //public void dosome()throws FileNotFoundException{}//抛出超类声明异常的子类型异常


    //public void dosome()throws IllegalAgeException{}//不允许抛出额外异常
    //public void dosome() throws Exception {}//不允许抛出超类方法抛出异常的超类型异常
}
